#ifndef __SCC_SCCSIM_H
#define __SCC_SCCSIM_H

#include <scos.h>
#include "scc.h"

#ifdef __cplusplus
extern "C" {
#endif

#ifdef PSOS
#define SCCSIM_IMAGE_INPUT  "/flash/in%d.raw"
#define SCCSIM_IMAGE_OUTPUT "/flash/out%d.raw"
#else
#define SCCSIM_IMAGE_INPUT  "/data/scratch/wcaarls/in%d.raw"
#define SCCSIM_IMAGE_OUTPUT "/data/scratch/wcaarls/out%d.raw"
#endif

#ifdef PSOS
#define scuBufferGetStride(x) 640
#define scuBufferGetLines(x)  480
#else
#define scuBufferGetStride(x) 1024
#define scuBufferGetLines(x)  1024
#endif

typedef struct sim_arg_s
{
  short int id;
  unsigned short int type;
  union
  {
    unsigned char b[8];    /* Must be 4-byte aligned for TriMedia! */
    int d;
    double f;
  } data;
  unsigned short int intent;
  scu_buf_t *buffer;
  scu_bufptrid_t reader;
  unsigned char *buf;

  int stream;

} sim_arg_t;

typedef struct sim_op_s
{
  short int id;
  unsigned short int operation;
  sim_arg_t argument[SC_MAX_ARGUMENTS];
  unsigned short int arguments, argreceived;
} sim_op_t;

void scSimInit(sc_proc_t *p);
void scSimExit(char *reportfile);

#ifdef __cplusplus
}
#endif

#endif /* __SCC_SCCSIM_H */
